home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12140 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1013 b 

  1. Path: darkstar.UCSC.EDU!moth
  2. From: moth@cse.ucsc.edu (Moth)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: microsecond delay
  5. Date: 29 Mar 1996 13:22:57 GMT
  6. Organization: UC Santa Cruz CIS/CE
  7. Message-ID: <4jgo7h$n7i@darkstar.UCSC.EDU>
  8. References: <14546@828046609>
  9. NNTP-Posting-Host: arapaho.cse.ucsc.edu
  10.  
  11. In article <14546@828046609>, dan j <djacobso@cs.indiana.edu> wrote:
  12. >We are writing a program that reads bar codes swiped on a card reader.
  13. >
  14. >The problem is that when we write to the device on the serial line,
  15. >the following read is too fast for the device.  We have to delay the
  16. >read briefly.  We can use "sleep" to delay a second, but that's too
  17. >long.
  18. >
  19. >Is there any way effect delays in miliseconds without resorting to
  20. >loops?
  21.  
  22. void usleep(unsigned long usec);
  23.  
  24.  
  25. -- 
  26. --=--=--=--=--=--=-\--=--=--=--=--=--=--=--=--=--=--=--=-\
  27. \ Jeff Edgett       \ "To whom the mornings stand for     \
  28. / ]\/[ {=} '|` ]-[   \  nights what must the midnights be!"\
  29. \_moth@cse.ucsc.edu___\____-Emily Dickenson_________________\
  30.